<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        <meta name="author" content="隐星魂 (Roy.Sun)">
        
        <link rel="shortcut icon" href="../../../img/favicon.ico">
        <title>正点原子F407核心板上手指南 - 玄武操作系统</title>
        <link href="../../../css/bootstrap.min.css" rel="stylesheet">
        <link href="../../../css/font-awesome.min.css" rel="stylesheet">
        <link href="../../../css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.3/styles/color-brewer.min.css">

        <script src="../../../js/jquery-1.10.2.min.js" defer></script>
        <script src="../../../js/bootstrap.min.js" defer></script>
        <script src="https://cdn.staticfile.org/highlight.js/10.0.3/highlight.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script> 
    </head>

    <body>
        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
            <div class="container">
                <a class="navbar-brand" href="../../..">玄武操作系统</a>
                <!-- Expander button -->
                <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                            <li class="navitem">
                                <a href="../../.." class="nav-link">主页</a>
                            </li>
                            <li class="navitem">
                                <a href="../../../license/" class="nav-link">开源协议</a>
                            </li>
                            <li class="dropdown active">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">快速开发指南 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
  <li class="dropdown-submenu">
    <a href="#" class="dropdown-item">STM32</a>
    <ul class="dropdown-menu">
            
<li>
    <a href="../01-Envsetup-Guide/" class="dropdown-item">开发环境搭建指南</a>
</li>
            
<li>
    <a href="../02-Project-Setup-Guide/" class="dropdown-item">工程配置指南</a>
</li>
            
<li>
    <a href="../03-atkh743/" class="dropdown-item">正点原子阿波罗H743开发板上手指南</a>
</li>
            
<li>
    <a href="../04-fk429m/" class="dropdown-item">反客F429核心板上手指南</a>
</li>
            
<li>
    <a href="./" class="dropdown-item active">正点原子F407核心板上手指南</a>
</li>
            
<li>
    <a href="../06-atkf103core/" class="dropdown-item">正点原子F103核心板上手指南</a>
</li>
    </ul>
  </li>
                                    
  <li class="dropdown-submenu">
    <a href="#" class="dropdown-item">NXP S32K</a>
    <ul class="dropdown-menu">
            
<li>
    <a href="../../s32k/01-Envsetup-Guide/" class="dropdown-item">开发环境搭建指南</a>
</li>
            
<li>
    <a href="../../s32k/02-Project-Setup-Guide/" class="dropdown-item">工程配置指南</a>
</li>
    </ul>
  </li>
                                    
  <li class="dropdown-submenu">
    <a href="#" class="dropdown-item">玄武内核模块</a>
    <ul class="dropdown-menu">
            
<li>
    <a href="../../xwko/01-XuanWuKO-Guide/" class="dropdown-item">上手指南</a>
</li>
    </ul>
  </li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">应用手册 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../../UserManual/00-index/" class="dropdown-item">00.目录</a>
</li>
                                    
<li>
    <a href="../../../UserManual/01-brief/" class="dropdown-item">01.简介</a>
</li>
                                    
<li>
    <a href="../../../UserManual/02-Basic-System-Architecture/" class="dropdown-item">02.系统基本架构</a>
</li>
                                    
<li>
    <a href="../../../UserManual/03-Build-System/" class="dropdown-item">03.构建系统</a>
</li>
                                    
<li>
    <a href="../../../UserManual/04-Boot-Flow/" class="dropdown-item">04.启动流程</a>
</li>
                                    
<li>
    <a href="../../../UserManual/05-IRQ/" class="dropdown-item">05.中断控制</a>
</li>
                                    
<li>
    <a href="../../../UserManual/06-SKD/" class="dropdown-item">06.调度器</a>
</li>
                                    
<li>
    <a href="../../../UserManual/07-Thread/" class="dropdown-item">07.线程</a>
</li>
                                    
<li>
    <a href="../../../UserManual/08-SWT/" class="dropdown-item">08.软件定时器</a>
</li>
                                    
<li>
    <a href="../../../UserManual/09-PM/" class="dropdown-item">09.电源管理</a>
</li>
                                    
<li>
    <a href="../../../UserManual/10-Lock/" class="dropdown-item">10.锁</a>
</li>
                                    
<li>
    <a href="../../../UserManual/11-Sync/" class="dropdown-item">11.同步</a>
</li>
                                    
<li>
    <a href="../../../UserManual/12-MM/" class="dropdown-item">12.内存管理</a>
</li>
                                    
<li>
    <a href="../../../UserManual/13-C-Lib/" class="dropdown-item">13.玄武C库</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">移植笔记 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../../PortingNote/00-index/" class="dropdown-item">目录</a>
</li>
                                    
<li>
    <a href="../../../PortingNote/01-Porting-Note/" class="dropdown-item">移植笔记</a>
</li>
                                    
  <li class="dropdown-submenu">
    <a href="#" class="dropdown-item">ARM-Cortex-M</a>
    <ul class="dropdown-menu">
            
<li>
    <a href="../../../PortingNote/ARM-Cortex-M/01-ARM-Cortex-M-Porting-Note/" class="dropdown-item">架构移植笔记</a>
</li>
            
<li>
    <a href="../../../PortingNote/ARM-Cortex-M/02-STM32-Porting-Note/" class="dropdown-item">STM32</a>
</li>
    </ul>
  </li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">规范 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../../Specification/00-index/" class="dropdown-item">目录</a>
</li>
                                    
<li>
    <a href="../../../Specification/01-Git-Commit-Specification/" class="dropdown-item">git-commit规范</a>
</li>
                                    
<li>
    <a href="../../../Specification/02-Version-Branch-Specification/" class="dropdown-item">版本分支规范</a>
</li>
                                </ul>
                            </li>
                        </ul>

                    <ul class="nav navbar-nav ml-auto">
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> 搜索
                            </a>
                        </li>
                            <li class="nav-item">
                                <a rel="prev" href="../04-fk429m/" class="nav-link">
                                    <i class="fa fa-arrow-left"></i> 上一篇
                                </a>
                            </li>
                            <li class="nav-item">
                                <a rel="next" href="../06-atkf103core/" class="nav-link">
                                    下一篇 <i class="fa fa-arrow-right"></i>
                                </a>
                            </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="row">
                    <div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
    <div class="navbar-header">
        <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
            <span class="fa fa-angle-down"></span>
        </button>
    </div>

    
    <div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
        <ul class="nav flex-column">
            
            <li class="nav-item" data-level="1"><a href="#f407" class="nav-link">正点原子F407核心板上手指南</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#1" class="nav-link">1.简介</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#2" class="nav-link">2.开发环境</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#21" class="nav-link">2.1.搭建环境</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#22" class="nav-link">2.2.下载工程</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#23" class="nav-link">2.3.导入工程</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#24" class="nav-link">2.4.重新设置编译环境</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#3stm32cubemx" class="nav-link">3.STM32CubeMX配置工程</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#4" class="nav-link">4.编译</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#5" class="nav-link">5.调试</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#51" class="nav-link">5.1.步骤</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#52" class="nav-link">5.2.技巧</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#6" class="nav-link">6.示例</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#7" class="nav-link">7.系统集成的原理</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#8" class="nav-link">8.代码启动流程</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#9" class="nav-link">9.功能</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            
            <li class="nav-item" data-level="1"><a href="#10" class="nav-link">10.附录</a>
              <ul class="nav flex-column">
              </ul>
            </li>
        </ul>
    </div>
</div></div>
                    <div class="col-md-9" role="main">

<h1 id="f407">正点原子F407核心板上手指南</h1>
<hr />
<h1 id="1">1.简介</h1>
<p><img alt="img" src="../res/figure/ATKF407Core.png" title="正点原子F407核心板" /></p>
<ul>
<li>MCU: STM32F407ZET6</li>
<li>SRAM: 1MiB</li>
<li>更多介绍: <a href="https://detail.tmall.com/item.htm?id=609293805821&amp;spm=a1z09.2.0.0.c0b02e8djM9HAe&amp;_u=o3vm7h3267f7">淘宝店铺介绍</a></li>
<li>电路板目录： XuanWuOS/xwbd/atkf407core</li>
</ul>
<hr />
<h1 id="2">2.开发环境</h1>
<h2 id="21">2.1.搭建环境</h2>
<ul>
<li><a href="../01-Envsetup-Guide/">开发环境搭建指南</a></li>
</ul>
<h2 id="22">2.2.下载工程</h2>
<ul>
<li>仓库：<a href="https://gitee.com/xwos/atkf407core.git">https://gitee.com/xwos/atkf407core.git</a></li>
<li>命令：</li>
</ul>
<pre><code class="sh">git clone --recursive https://gitee.com/xwos/atkf407core.git
cd atkf407core
unzip project-template.zip
</code></pre>

<ul>
<li>工程需放在STM32CubeIDE的工作目录内（即STM32CubeIDE启动时指定的目录），
    并按照上面的命令将<code>project-template.zip</code>解压到工程目录中，
    这些文件为工程模板。</li>
</ul>
<p><img alt="img" src="../res/figure/atkf407core-Project-Folder.png" title="工程目录" /></p>
<ul>
<li>已有工程，同步命令：</li>
</ul>
<pre><code class="sh">cd atkf407core
git pull
git submodule update
</code></pre>

<h2 id="23">2.3.导入工程</h2>
<p>打开菜单<strong>File --&gt; Import... --&gt; General --&gt; Projects from Folder or Archive</strong></p>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Import.png" title="导入工程" /></p>
<h2 id="24">2.4.重新设置编译环境</h2>
<ul>
<li>打开菜单<strong>"Project --&gt; Properties --&gt; C/C++ Build --&gt; Environment"</strong>；</li>
<li>点击<strong>"Restore Defaults"</strong>；</li>
<li>参考<a href="../02-Project-Setup-Guide/">工程配置指南</a>
    中的 <strong>“使用STM32CubeIDE进行开发 -- 编译环境设置”</strong> 以及
    <strong>"使用STM32CubeIDE进行开发 -- 设置工具链为GNU MCU Eclipse提供的工具链"</strong>
    重新设置环境变量。</li>
</ul>
<h3 id="debug">Debug编译环境设置</h3>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Project-Properties-C-Build-Env-Debug.png" title="Debug配置" /></p>
<h3 id="release">Release编译环境设置</h3>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Project-Properties-C-Build-Env-Release.png" title="Release配置" /></p>
<h3 id="linuxpath">Linux下的环境变量<strong>PATH</strong>设置</h3>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Properties-C-Build-Env-Path-Linux.png" title="Linux-Env-PATH" /></p>
<h3 id="windowspath">Windows下的环境变量<strong>PATH</strong>设置</h3>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Properties-C-Build-Env-Path-Windows.png" title="Windows-Env-PATH" /></p>
<hr />
<h1 id="3stm32cubemx">3.STM32CubeMX配置工程</h1>
<p>工程中已经包含了STM32CubeMX的配置文件，可以在STM32CubeMX中打开
文件<code>xwbd/atkf407core/bm/stm32cube/cubemx/atkf407core.ioc</code>后进行修改，但需要注意：</p>
<ul>
<li>NVIC设置<ul>
<li>设置3个抢占优先级位和1个子优先级位</li>
<li>SVC中断设置成<strong>最高</strong>优先级，即<strong>Preemption Priority</strong>为0；</li>
<li>PendSV中断设置成<strong>最低</strong>优先级，即<strong>Preemption Priority</strong>为7；</li>
<li>Systick中断设置成<strong>最低</strong>优先级，即<strong>Preemption Priority</strong>为7；</li>
<li>系统Fault的优先级设置为0；</li>
<li>其他中断的优先级只可在<strong>1~6</strong>之间。</li>
</ul>
</li>
</ul>
<hr />
<h1 id="4">4.编译</h1>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Build.png" title="编译" /></p>
<hr />
<h1 id="5">5.调试</h1>
<p>打开菜单<strong>Run --&gt; Debug Configurations...</strong>，根据仿真器类型，选择调试配置：</p>
<ul>
<li><code>atkf407core-openocd-daplink</code>：<strong>gdb</strong> + <strong>openocd</strong> + <strong>DAPLink调试器</strong></li>
<li><code>atkf407core-openocd-jlink</code>：<strong>gdb</strong> + <strong>openocd</strong> + <strong>JLink调试器</strong></li>
<li><code>atkf407core-stlink</code>：<strong>gdb</strong> + <strong>STLink GDB Server</strong> + <strong>JLink调试器</strong></li>
</ul>
<p><img alt="img" src="../res/figure/STM32CubeIDE-Debug-Configurations.png" title="调试配置" /></p>
<h2 id="51">5.1.步骤</h2>
<ul>
<li>使用MicroUSB线连接电路板上的USB-232接口与PC；</li>
</ul>
<p><img alt="img" src="../res/figure/ATKF407Core-PCB.png" title="正点原子F407核心板PCB" /></p>
<ul>
<li>打开终端工具（windows可选putty、SecretCRT，Linux可选gtkterm、picocom、minicom）,
    但先不要在终端工具中打开串口，否则MCU会进入下载模式；</li>
<li>上电，STM32CubeIDE中启动调试，等待MCU运行到初始断点；</li>
<li>在终端工具中打开串口，参数：1M波特率/8位数据/1位停止位/无奇偶校验；</li>
<li>开始单步调试或连续运行调试。</li>
</ul>
<h2 id="52">5.2.技巧</h2>
<h4 id="_1">复位系统</h4>
<p>因为板子的调试接口是4线SWD，与调试器之间没有复位线连接，经常无法完成自动复位，
时常发生在下载完程序，等待MCU运行到初始断点处时。可按以下步骤处理：</p>
<ul>
<li>在程序的初始化流程中设置一个断点，例如<code>xwos_main()</code>函数内部；</li>
<li>若MCU处于停止运行状态，需要让MCU处于运行状态：</li>
</ul>
<p><img alt="img" src="../res/figure/STM32CubeIDE-DebugResume.png" title="Debug-Resume" /></p>
<ul>
<li>手动按一下板子上的复位按键，此时MCU可停在预设的断点处。</li>
</ul>
<h4 id="_2">关闭写缓存</h4>
<p>ARMv7-m4内核的MCU带有写缓存，常常会对定位程序BUG带来困扰，可以在调试时关闭。</p>
<pre><code class="C">/* xwbd/atkf407core/bm/stm32cube/mif.c */

__xwbsp_init_code
void stm32cube_lowlevel_init(void)
{
        ...
        cm_scs.scnscb.actlr.bit.disdefwbuf = 1; /* disdefwbuf位置1关闭写缓存 */
        ...
}
</code></pre>

<hr />
<h1 id="6">6.示例</h1>
<p>玄武OS中有多个示例可帮助用户快速了解API的用法：</p>
<ul>
<li>线程<ul>
<li>创建线程：<code>xwam/example/thread/create</code></li>
<li>线程睡眠：<code>xwam/example/thread/sleep</code></li>
</ul>
</li>
<li>定时器：<code>xwam/example/timer</code></li>
<li>同步<ul>
<li>信号量：<code>xwam/example/sync/sem</code></li>
<li>条件量：<code>xwam/example/sync/cond</code></li>
<li>事件标志：<code>xwam/example/sync/flg</code></li>
<li>线程栅栏：<code>xwam/example/sync/br</code></li>
<li>信号选择器：<code>xwam/example/sync/sel</code></li>
</ul>
</li>
<li>锁<ul>
<li>中断管理：<code>xwam/example/lock/cpuirq</code></li>
<li>自旋锁：<code>xwam/example/lock/spinlock</code></li>
<li>顺序锁：<code>xwam/example/lock/seqlock</code></li>
<li>互斥锁：<code>xwam/example/lock/mtx</code></li>
</ul>
</li>
<li>内存管理<ul>
<li>简单内存分配器：<code>xwam/example/mm/sma</code></li>
<li>内存切片分配器：<code>xwam/example/mm/memslice</code></li>
<li>伙伴算法分配器：<code>xwam/example/mm/bma</code></li>
<li>内存池：只用于比较大的内存区域的管理，例如外接的SRAM。
    atkf407core工程已经为板载的SRAM建立了内存池。</li>
</ul>
</li>
<li>玄武C库<ul>
<li>CRC：<code>xwam/example/xwlib/crc</code></li>
</ul>
</li>
</ul>
<p>每个示例中都有一个<code>xxx_start()</code>函数，可在<code>xwbd/atkf407core/bm/main/main.c</code>文件中的
主线程<code>main_thrd()</code>中调用这些函数启动示例，但最好一次只启动一个示例，避免冲突。</p>
<pre><code class="C">/* xwbd/atkf407core/bm/main/main.c */

xwer_t main_thrd(void * arg)
{
        ...
        example_flag_start();
        ...

        return XWOK;
}
</code></pre>

<hr />
<h1 id="7">7.系统集成的原理</h1>
<ul>
<li>所有移植的第三方组件、驱动包、示例代码等都是以<strong>玄武模块</strong>独立编译成
    静态库<strong>.a</strong>，之后再将它们链接成ELF文件，再由ELF生成bin或Hex文件。</li>
<li>每个<strong>玄武模块</strong>都是一个独立的子工程，其设计思想借鉴了安卓系统的<strong>Android.mk</strong>，
    因此每个<strong>玄武模块</strong>中都有一个<code>xwmo.mk</code>文件，每个<strong>玄武模块</strong>都是独立编译的。
    每个<code>xwmo.mk</code>中定义的<strong>编译参数</strong>、<strong>头文件搜索路径</strong>只对<strong>当前玄武模块</strong>有效。</li>
<li>每个<strong>玄武模块</strong>都是一个封闭的包，外部需要使用其中头文件时需要注意头文件的依赖关系与搜索路径。
    通常，开发者需要对外提供<strong>接口头文件</strong>，这些<strong>接口头文件</strong>只能包含外部可见
    的<strong>类型定义</strong>以及<strong>API接口</strong>。例如，工程中，<code>xwbd/atkf407core/bm</code>文件夹下
    有很多<strong>玄武模块</strong>内都包含了一个名为<strong>mif.h</strong>的头文件，意思是<strong>模块接口(Module InterFace)</strong>，
    供其他模块调用。</li>
<li><strong>电路板模块</strong>(<code>xwbd/atkf407core/bm</code>)内有一个主模块<strong>main</strong>，提供<code>xwos_main()</code>函数，
    此模块功能类似于传统C语言的main()函数，为用户代码的入口。</li>
<li>玄武OS内包含了大量<strong>玄武模块</strong>，例如<code>xwcd</code>内包含了一些外设芯片的驱动，<code>xwam</code>内包含了
    示例与一些应用，<code>xwmd</code>内包含了中间件，<code>xwem</code>包含了移植的第三方开源软件。
    这些<strong>玄武模块</strong>对所有<code>xwbd</code>中的开发板理论上都是复用的。</li>
<li>有关<strong>玄武模块</strong>可以参考<a href="../../../UserManual/03-Build-System/">应用手册——构建系统</a>。</li>
</ul>
<hr />
<h1 id="8">8.代码启动流程</h1>
<p><img alt="img" src="../res/figure/stm32-boot-flow.png" title="STM32启动流程" /></p>
<ul>
<li><code>stm32cube_lowlevel_init()</code>：初始化时钟</li>
<li><code>stm32cube_init()</code>：初始化内存管理、cache、GPIO、DMA等基础设备</li>
<li><code>main_thrd()</code>：初始化其他设备、启动其他子线程</li>
</ul>
<hr />
<h1 id="9">9.功能</h1>
<ul>
<li>BSP<ul>
<li>STM32Cube模块：<code>xwbd/atkf407core/bm/stm32cube</code></li>
<li>STM32CubeMX配置文件：<code>xwbd/atkf407core/bm/stm32cube/cubemx/atkf407core.ioc</code></li>
<li>STM32CubeMX生成源码目录：<code>xwbd/atkf407core/bm/stm32cube/cubemx</code></li>
<li>STM32Cube适配玄武OS的源码：<code>xwbd/atkf407core/bm/stm32cube/xwac</code></li>
<li>终端UART<ul>
<li>设备：USART1</li>
<li>参数：1M波特率/8位数据/1位停止位/无奇偶校验</li>
<li>驱动<ul>
<li>驱动框架 —— 设备栈：<code>xwmd/ds/uart/dma.c</code></li>
<li>设备栈驱动：<code>xwbd/atkf407core/bm/stm32cube/xwac/xwds/uart.c</code></li>
<li>HAL库驱动：<code>xwbd/atkf407core/bm/stm32cube/cubemx/Core/Src/usart.c</code></li>
</ul>
</li>
</ul>
</li>
<li>SRAM<ul>
<li>映射地址：<strong>0x68000000</strong></li>
<li>大小：<strong>1MiB</strong></li>
<li>驱动：<code>xwbd/atkf407core/bm/stm32cube/cubemx/Core/Src/fsmc.c</code></li>
<li>内存池<ul>
<li>头文件<ul>
<li><code>xwbd/atkf407core/bm/stm32cube/mif.h</code></li>
<li><code>xwos/mm/mempool/allocator.h</code></li>
</ul>
</li>
<li>内存池对象：<code>sram_mempool</code></li>
<li>申请：<code>xwmm_mempool_malloc(sram_mempool, ...)</code></li>
<li>释放：<code>xwmm_mempool_free(sram_mempool, ...)</code></li>
<li>重新申请：<code>xwmm_mempool_realloc(sram_mempool, ...)</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr />
<h1 id="10">10.附录</h1>
<ul>
<li>参考文档<ul>
<li><a href="../01-Envsetup-Guide/">开发环境搭建指南</a></li>
<li><a href="../02-Project-Setup-Guide/">工程配置指南</a></li>
<li><a href="../../../UserManual/00-index/">应用手册</a></li>
</ul>
</li>
</ul></div>
            </div>
        </div>

        <footer class="col-md-12">
            <hr>
            <p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
        </footer>
        <script>
            var base_url = "../../..",
                shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
        </script>
        <script src="../../../js/base.js" defer></script>
        <script src="../../../search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="searchModalLabel">搜索</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
                <p>
                    在这里所有文档：
                </p>
                <form>
                    <div class="form-group">
                        <input type="search" class="form-control" placeholder="搜索..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>
